package com.wm.chain;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @ClassName: ResponseHandler
 * @Description: 请求反馈类
 * @Author: WM
 * @Date: 2023/5/5 9:12
 */
public class ResponseHandler extends AbstractHandler implements Handler {
    private final static Logger logger = LoggerFactory.getLogger(ResponseHandler.class);
    private String name;

    public ResponseHandler(String name) {
        this.name = name;
    }

    @Override
    public void operator() {
        logger.info("message response...");
        if (getHandler() != null) {
            // 执行责任链的下一个流程
            getHandler().operator();
        }
    }
}